package com.gitee.neuray.security.admin.authority;

import lombok.Data;

/**
 * @author: zhhongyu
 * @description: 权限按钮
 * @since: Create in 16:59 2020/3/26
 */
@Data
public class PermissionElementDto implements Comparable<PermissionElementDto>{
    private String resourceId;
    /**
     * 按钮请求方式
     */
    private String method;
    /**
     * 按钮编码标识
     */
    private String code;
    /**
     * 按钮所对应的菜单的短地址
     */
    private String uri;
    /**
     * 菜单名称
     */
    private String title;

    @Override
    public int compareTo(PermissionElementDto frontPermission) {
        Integer length = this.uri.length();
        return length.compareTo(frontPermission.getUri().length());
    }
}
